{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "from PIL import Image\n",
    "import os\n",
    "import numpy as np\n",
    "import yaml"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [],
   "source": [
    "with open('../config.yml', 'r') as f:\n",
    "    config = yaml.safe_load(f)\n",
    "\n",
    "data_path = os.path.abspath(config['data_path'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [],
   "source": [
    "folder_names = ['CUB_fewshot_cropped','CUB_fewshot_raw','Aircraft_fewshot','meta_iNat',\n",
    "               'tiered_meta_iNat','mini-ImageNet','tiered-ImageNet','tiered-ImageNet_DeepEMD']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "/scratch/lt453/FRN_pre/tiered-ImageNet/train/8_126/161884.png\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAFQAAABUCAIAAACTCYeWAAA650lEQVR4nG28Sey325YWtNbu3r75df/u68+53bl1b1XRFCAQYoFAKcYegiOb6MSJiQMHDkwkhhmEEHWoAxIVjYgE40CagVBVUBRVtzn3nHNP97X/9te+3X53uxx8VVRhXMM92s/e73qftbOe9eC/++//x32363YnQGt9ZABEBIBCYERABEQOhPB+HSNDIVkSvGOEUokIhIiPXpx/76Nvi2jbMpv1pBLR9wcMoSxbKWVVqOinN29fpwJfPHlqnSurbBq7fn/cLFan0+Hu/ma5aMxxHyMAlyEwp4oxpJ0xLvLAMyvS0QiWlihyR1xIlaQpMXG2We4ethE8QxmJAIAYYEQGgIDE0BDN0wRaA5KeJoEwz1MmFWOMo8M//q/+62YeWOTOjgCARDFGRIT3wRjjHPA9cmSIRITEGGMQPQABk4wJoJDm7PmT1cVmcbFcbJblIqfH581+vxciEQytDw+7rULGkI2HnZ+Htsjyojg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+2T68DA+mSuAAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<PIL.PngImagePlugin.PngImageFile image mode=RGB size=84x84 at 0x7FC770057E50>"
      ]
     },
     "execution_count": 29,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.random.shuffle(folder_names)\n",
    "dataset_path = os.path.join(data_path,folder_names[0])\n",
    "split = os.listdir(dataset_path)\n",
    "np.random.shuffle(split)\n",
    "cat_list = os.listdir(os.path.join(dataset_path,split[0]))\n",
    "np.random.shuffle(cat_list)\n",
    "img_list = os.listdir(os.path.join(dataset_path,split[0],cat_list[0]))\n",
    "np.random.shuffle(img_list)\n",
    "print(os.path.join(dataset_path,split[0],cat_list[0],img_list[0]))\n",
    "Image.open(os.path.join(dataset_path,split[0],cat_list[0],img_list[0]))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
